module.exports = {
  root: true,
  extends: [
    "eslint:recommended",
    "plugin:@typescript-eslint/recommended",
    "react-app"
  ].concat([
    "./rules/common.yml",
    "./rules/react.yml"
  ].map(require.resolve)).concat([
    "plugin:prettier/recommended"
  ]),
  env: {
    "browser": true,
    "node": true,
    "es6": true
  },
  plugins: [
    '@typescript-eslint',
    'prettier'
  ],
  parser: '@typescript-eslint/parser',
  parserOptions: {
    ecmaVersion: 2020,
    sourceType: 'module',
  },
  rules: {
    'no-console': process.env.NODE_ENV === 'production' ? 'warn' : 'off',
    'no-debugger': process.env.NODE_ENV === 'production' ? 'warn' : 'off',
  }
}